home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR02 / DCGAMES1.ZIP / NEWGAME.ZIP / CIVILIAN.SCR < prev    next >
Text File  |  1993-04-01  |  1KB  |  62 lines

  1. !
  2. ! Default civilian script..
  3. !
  4. ! (c) DC Software, 1992
  5. !
  6. ! Pending Enhancements
  7. !
  8. ! - This script has no voices.  For an example of voices, look at
  9. !   MERCHANT.SCR and HEALER.SCR
  10. !   
  11.  
  12. !------------------------------------------------------------------------!
  13. :@TALK ! Talk to the character !
  14. !------------------------------------------------------------------------!
  15.  
  16. ! First, say hello.. !
  17.   if NPC.V0 > 0 then
  18.     writeln( "Hello ", player.name, ". What brings you back?" );
  19.   else
  20.     writeln( "Hello. I am ", npc.name, ". How may I help you?" );
  21.   endif;
  22.  
  23. ! Now, set some variables..
  24.   NPC.V0 = 1; ! From know on, remember we've been here
  25.  
  26. :LOOP
  27.   L3 = getstr("Name","Job","Join","Bye");
  28.   if L3 = -1 then 
  29.     writeln( "Ok." );
  30.     STOP;
  31.   endif;
  32.  
  33. ! First, see if the keyword typed is in the character's text block !
  34.   if dotext( S0 ) goto LOOP;
  35.  
  36. ! It didn't, so try the predefined ones..
  37.   on L3 goto CNAME, CJOB, CJOIN, CSTOP;
  38.  
  39. ! Nope, try a 'DEFAULT' line
  40.   if not dotext( "DEFAULT" ) then
  41.     writeln( "I don't know anything about that!" );
  42.   endif;
  43.   goto LOOP;
  44.  
  45. :CNAME
  46.   writeln( "My name is ", NPC.name, "." );
  47.   GOTO LOOP;
  48.  
  49. :CJOB
  50.   writeln( "I am a ", npc.type );
  51.   GOTO LOOP;
  52.  
  53. :CJOIN
  54.   writeln( "I'm too busy.  Sorry." );
  55.   GOTO LOOP;
  56.  
  57. :CSTOP
  58.   writeln( "Nice talking to you.." );
  59.   STOP;
  60.  
  61. ! Feel free to expand on this list.. !
  62.